<%@ page contentType="text/html; charset=utf-8" %>
<%@ page isELIgnored="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<div class="Toolbar">
	<div class="listTool">
		<div class="page">
		
<script type="text/javascript">
function gotoPage(cpage){

	var doList = '!doList.ts?';

	var url =  '${pager.requestUrl}';  

	if(-1==url.indexOf('?')){
		
		if(-1==url.indexOf('!')){
			url = url+doList;
		}else{
			url = url.replace(/!.+/,doList);
		}

	}else{
		url = url.replace(/!.+\?/,doList);
	}
	url+='&cpage='+cpage;
	window.location = url;
	if(typeof(ajaxAnywhere) != "underfined"){
		ajaxAnywhere.showLoadingMessage();
	}
}
</script>
<span class="pageinfo">共${pager.totalCount}条</span>
<c:if test="${!pager.hasPrePageNum}"><span class="disabled"> < </span></c:if>
<c:if test="${pager.hasPrePageNum}"><a href="#" onclick="gotoPage(${pager.currentPageNum-1});"> < </a></c:if>

<c:forEach var="arr" items="${pager.startPoints}">
<a href="#" pager="${arr}" onclick="gotoPage(${arr});" >${arr}</a>
</c:forEach>

<c:if test="${pager.interval[0]>pager.edgePageNum+1}">...</c:if>

<c:forEach var="arr" begin="${pager.interval[0]}" end="${pager.interval[1]}">
<c:if test="${arr==pager.currentPageNum}"><span class="current"><font color="red">${arr}</font></span></c:if>
<c:if test="${arr!=pager.currentPageNum}"><a href="#" pager="${arr}" onclick="gotoPage(${arr});">${arr}</a></c:if>
</c:forEach>

<c:if test="${pager.interval[1]<pager.totalPageNum-pager.edgePageNum-1}">...</c:if>

<c:forEach var="arr" items="${pager.endPoints}">
<a href="#" pager="${arr}" onclick="gotoPage(${arr});">${arr}</a>
</c:forEach>

<c:if test="${!pager.hasNextPageNum}"><span class="disabled"> > </span></c:if>
<c:if test="${pager.hasNextPageNum}"><a href="#" onclick="gotoPage(${pager.currentPageNum+1});"> > </a></c:if>

		</div>
	</div>
</div>
